﻿@model Nutrapp.Models.RecipeModel

@{
    ViewBag.Title = "Create";
}

@*"Create", "Recipe", FormMethod.Post, new { @class = "span4" })*@

<div class="panel-body center-block">
    @using (Html.BeginForm("Create", "Recipe", FormMethod.Post, 
                            new { enctype = "multipart/form-data" }))
    {
        <fieldset>
            <legend>Create Recipe</legend>
            <div class="form-group">
                <label class="span2">Recipe Name</label>
                @Html.TextBoxFor(m => m.Name, new { @class = "form-control" })
                @Html.ValidationMessageFor(m => m.Name)

            </div>
            <div class="form-group">
                <label class="span2">Cost</label>
                @Html.TextBoxFor(m => m.Cost, new { @class = "form-control" })
            </div>
            <div class="form-group">
                <label class="span2">Rate</label>
                @Html.TextBoxFor(m => m.Rating, new { @class = "form-control" })
            </div>
            <div class="form-group">
                <label class="span2">Picture</label>
                <input id="image" name="image" type="file" value="">
                @Html.ValidationMessageFor(m => m.Picture)

            </div>
            <div class="form-group">
                <label class="span2">Ingredient</label>

                @*@Html.DropDownListFor(m => m.getIngredientList(), new SelectList(Model.getIngredientList(), "Name", "Name", new { @class = "form-control" }))*@
                <label class="span2">Quantity</label>
                @Html.TextBox("Quantity", new { @class = "form-control" })
                <label class="span2">Unit</label>
                @*@Html.DropDownListFor(m => m.getUnitList(), new SelectList(Model.getUnitList(), "Unit1", "Unit1", new { @class = "form-control" }))*@
                <button class="btn btn-primary">+</button>
            </div>

            <div class="form-group">
                <label class="span2">Instructions</label>
                @Html.TextAreaFor(m => m.Instruction, new { @class = "form-control" , rows = 8  }) 
            </div>
            <div class="text-center">
                <div class="form-actions">
                    <input type="submit" value="Submit" class="btn btn-default" /> 
                    @*<button type="submit" class="btn btn-primary">Save</button>*@
                    @Html.ActionLink("Cancel", "Index", "Recipe", null, new { @class = "btn btn-default" })
                </div>
            </div>
        </fieldset>
    }
</div>